package easy;

public class Solution_1662 {

    public boolean arrayStringsAreEqual(String[] word1, String[] word2) {
        StringBuffer a = new StringBuffer();
        for (String s : word1) {
            a.append(s);
        }
        StringBuffer b = new StringBuffer();
        for (String s : word2) {
            b.append(s);
        }
        return a.toString().equals(b.toString());
    }

    /*public boolean arrayStringsAreEqual(String[] word1, String[] word2) {
        int i = 0, ii = 0, j = 0, jj = 0;
        while (i < word1.length && j < word2.length) {
            char a = word1[i].charAt(ii++);
            char b = word2[j].charAt(jj++);
            if (a != b) {
                return false;
            }
            if (word1[i].length() == ii) {
                i++;
                ii = 0;
            }
            if (word2[j].length() == jj) {
                j++;
                jj = 0;
            }
        }
        return i == word1.length && j == word2.length;
    }*/

    public static void main(String[] args) {
//        Solution_1656 model = new Solution_1656();
//        PrintUtils.arrayInt(model.decrypt(new int[]{5, 7, 1, 4}, 3));
//        PrintUtils.arrayInt(model.decrypt(new int[]{1,2,3,4}, 0));
//        PrintUtils.arrayInt(model.decrypt(new int[]{2,4,9,3}, -2));
    }
}
